<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('home.index');
});
//首页
Route::get('home', function () {
    return view('home.index');
});
//作品欣赏
Route::get('enjoy', function () {
    return view('home.enjoy');
});



//列表
Route::get('art', 'home\CategoryController@art');
Route::get('home/art', 'home\CategoryController@order');
Route::get('home/are', 'home\RegisterController@are');

//图片详情
Route::get('detail', function () {
    return view('home.detail');
});
//个人中心
Route::get('myZone', function () {
    
    return view('home.myZone');
});
//文件上传
Route::get('uploadFile', function () {
    return view('home.uploadFile');
});

//修改头像页面
Route::get('changeHead', function () {
    return view('home.changeHead');
});

//登陆页面
Route::get('login', function () {
    return view('home.login');
});
//注册页面
Route::get('register', function () {
    return view('home.register');
});


// Auth::routes();

Route::get('/home', 'HomeController@index');

//详情
Route::get('/home/detail','Home\DetailController@del');
Route::get('/home/detail/{id}','Home\DetailController@detail');
//登陆动作
Route::post('/home/login','Home\LoginController@login');
//注册动作
Route::post('/home/register','Home\LoginController@register');
//退出
Route::get('logout','Home\LoginController@logout');

//文件上传动作
Route::post('home/uploadFile','Home\UpController@upload');
//我的上传
Route::get('userUpload','Home\UpController@index');
//活动专区
Route::get('home/active','Home\ActiveController@index');



//后台登陆
Route::get('/admin/login','Admin\LoginController@index');
Route::POST('/admin/ace/login','Admin\LoginController@login');
//退出
Route::get('admin/ace/logout','Admin\LoginController@logout');


//后台
Route::get('admin/ace/active', 'AdminController@index');
//后台图片通过
Route::get('admin/ace/active/edit/{id}', 'AdminController@edit');
//删除图片
Route::get('admin/ace/active/del/{id}', 'AdminController@del');

//后台活动
Route::get('admin/ace/photo', 'AdminController@act');
//提前结束
Route::get('admin/ace/photo/edit/{id}', 'AdminController@Pedit');
//删除活动
Route::get('admin/ace/photo/del/{id}', 'AdminController@Pdel');
//添加活动页面
Route::get('admin/ace/addActive', 'AdminController@addActive');
Route::post('admin/ace/photo/add', 'AdminController@add');
